//
//  NSPieceView.h
//  SpeedTest
//
//  Created by Han Mingjie on 2020/1/6.
//  Copyright © 2020 MingJie Han. All rights reserved.
//
#import "TargetConditionals.h"
#import "NSECGRealTimeOSControl.h"


NS_ASSUME_NONNULL_BEGIN
@protocol NSPieceViewDataSource;

@interface NSPieceView : UIView{
    UIColor *line_color;
    UIColor *lost_line_color;
    id <NSPieceViewDataSource> dataSource;
    NSUInteger index;
    NSUInteger data_index;
    NSArray <NSString *>*ecg_name;
    NSArray <NSNumber *>*ecg_lead_status;
    float line_width;
    float x_start_init_value;
    float x_seek_per_point;
}
@property (nonatomic) id <NSPieceViewDataSource> dataSource;
@property (nonatomic) NSUInteger index;
@property (nonatomic) NSUInteger data_index;
@property (nonatomic) NSArray <NSString *>*ecg_name;
@property (nonatomic) NSArray <NSNumber *>*ecg_lead_status;
@property (nonatomic) UIColor *line_color;
@property (nonatomic) UIColor *lost_line_color;
@property (nonatomic) float line_width;
@property (nonatomic) float x_start_init_value;
@property (nonatomic) float x_seek_per_point;
@property (nonatomic) BOOL isDrawNewLine;

-(void)clean_in_thread;
-(void)fresh_in_thread;
@end

@protocol NSPieceViewDataSource <NSObject>
@required
-(NSArray <NSArray <NSNumber *>*>*)getValueFrom:(NSPieceView *)pieceView;
@end
NS_ASSUME_NONNULL_END
